New Operator

P T Withington ptw at pobox.com
Thu Mar 6 05:51:54 PST 2008


Don't you want to be able to express rounding mode?  And if so, do you  
need 4 operators? floor/, ceiling/, round/, truncate/?  Oh, maybe they  
should be named /-, /+, /~ and /0.  Yow.

Is div truncate/, or round/?  I can never remember.

On 2008-03-05, at 18:18 EST, Lars Hansen wrote:

> Just \ would work if we're happy with not allowing its use at the  
> end of
> a line.  A little dodgy, syntactically, IMO.  I've advocated "\\" in  
> the
> past, which by normal lexing rules would be unambiguous by the
> longest-token lexing rule.
>
> ("/." is ambiguous, consider 3/.5.)
>
> --lars
>
>
> ________________________________
>
> 	From: Michael O'Brien [mailto:mob at mbedthis.com]
> 	Sent: 5. mars 2008 15:06
> 	To: Lars Hansen
> 	Cc: TNO; es4-discuss at mozilla.org
> 	Subject: Re: New Operator
> 	
> 	
> 	I'll vote for that also. It improves readability quite a bit.
> 	
> 	But is there a better operator than "\"?
> 	
> 	Shame "//" is taken.  What about  "/."
> 	
> 	Michael
> 	
> 	Lars Hansen wrote:
>
> 		I have been pushing for this in the past on several
> occasions, but enthusiasm in the WG has been scant, unfortunately.
> Maybe I haven't been pushing hard enough.
> 		
> 		--lars
>
>
> ________________________________
>
> 			From: es4-discuss-bounces at mozilla.org
> [mailto:es4-discuss-bounces at mozilla.org] On Behalf Of TNO
> 			Sent: 5. mars 2008 14:13
> 			To: es4-discuss at mozilla.org
> 			Subject: New Operator
> 			
> 			
> 			Is it too late to propose an integer division
> operator into the spec? I do quite a bit of WSH programming in both
> VBScript an JScript and sometimes its a bit of an irritant during a
> translation, it would be nice to see this operator "\" available in  
> the
> new ECMAScript instead of having to rely on more inefficient
> workarounds:
> 			
> 			VBScript:
> 			
> 			Dim result
> 			result = 19 \ 4 '(result = 4)
> 			
> 			JScript:
> 	
> http://www.codingforums.com/showthread.php?t=58799
>
> 		
> ________________________________
>
>
> 		_______________________________________________
> 		Es4-discuss mailing list
> 		Es4-discuss at mozilla.org
> 		https://mail.mozilla.org/listinfo/es4-discuss
> 		
>
> _______________________________________________
> Es4-discuss mailing list
> Es4-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es4-discuss




More information about the Es4-discuss mailing list