www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Downs' proposal, cooperate with linker to emit message?

reply davidl <davidl 126.com> writes:
The problem of leaving a method outside the class would complicate the  
compiler forward reference.
while the idea is the unified mangle method could generate code without  
knowing forward references only
when you want the compiler emit error messages when programmer calls a  
method which doesn't exist.
well the idea here is cooperate with linker , the linker would emit  
missing blahblah symbol, and the
compiler could use the symbol to emit reasonable compile message. And now  
everything goes fine.
No slowening compiler speed while with reasonable compile message

-- 
使用 Opera 革命性的电子邮件客户程序: http://www.opera.com/mail/
May 22 2007
parent davidl <davidl 126.com> writes:
The only problem is leaving the mesesages to link-time, not compile-time,
while I think it's totally acceptable for the missing method error. Cause
library writers should always keep in mind they offer a full set of  
methods,
and users who forget to implement one method till link time could only
blame himself for his stupidity.


 The problem of leaving a method outside the class would complicate the  
 compiler forward reference.
 while the idea is the unified mangle method could generate code without  
 knowing forward references only
 when you want the compiler emit error messages when programmer calls a  
 method which doesn't exist.
 well the idea here is cooperate with linker , the linker would emit  
 missing blahblah symbol, and the
 compiler could use the symbol to emit reasonable compile message. And  
 now everything goes fine.
 No slowening compiler speed while with reasonable compile message
-- 使用 Opera 革命性的电子邮件客户程序: http://www.opera.com/mail/
May 22 2007