CSS vs. Javascript

Lars T Hansen lth at acm.org
Sat Jan 6 02:39:15 PST 2007


On Jan 5, 2007, at 11:54 PM, Brendan Eich wrote:

> On Jan 5, 2007, at 1:06 PM, P T Withington wrote:
>
>> Was any thought given to permitting:
>>
>>   #F00D1E
>>
>> notation for hex literals in Javascript?  I get a lot of grief  
>> because you can use that notation in CSS but not in Javascript.
>
> Interesting; I've never heard such complaints.  Perhaps not enough  
> use-cases in the browser for hex-numbered CSS colors?
>
> Minor conflict with SpiderMonkey's CL-inspired sharp variables:
>
> var cyclic = #1={kid: {parent: #1#};
>
> Possibly other implementations use # in extensions?  It's in  
> demand, at least on the first line and followed by !, as a comment- 
> to-end-of-line delimiter.

Opera has supported CPP-style #ifdefs in the past, though this has  
not been documented. I think it would be nice to reserve # for other  
things than hex literals, especially given that we have a notation  
for those already.

--lars




More information about the Es4-discuss mailing list