www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Re: Re: Is the world coming to an end?

reply ulrik.mikaelsson gmail.com writes:
--000e0cd1faace6877d049ff6a858
Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes

About time someone dropped the 0777-nonsense. The least common digit-base  
should not easily be invoked "by accident".

However:


 I don't like the "octal!" a lot, I prefer a syntax like the Python3 one,  
 but Walter never stops moving himself forward :-)

I too was just about to ask why on earth "octal!" instead of 0o (and I didn't know about Python3). Sure, I think it's nice and clean language-wise to implement it as a template-function, but if so the same should go for 0b and 0x? Are they too deprecated in D2? --000e0cd1faace6877d049ff6a858 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable About time someone dropped the 0777-nonsense. The least common digit-base s= hould not easily be invoked &quot;by accident&quot;.<br /><br />However:<br= /><br />&gt; <br />&gt; I don&#39;t like the &quot;octal!&quot; a lot, I p= refer a syntax like the Python3 one, but Walter never stops moving himself = forward :-)<br />&gt; <br />I too was just about to ask why on earth &quot;= octal!&quot; instead of 0o (and I didn&#39;t know about Python3).<br /><br = />Sure, I think it&#39;s nice and clean language-wise to implement it as a = template-function, but if so the same should go for 0b and 0x? Are they too= deprecated in D2? --000e0cd1faace6877d049ff6a858--
Apr 02 2011
next sibling parent reply Daniel Gibson <metalcaedes gmail.com> writes:
Am 03.04.2011 00:00, schrieb ulrik.mikaelsson gmail.com:
 About time someone dropped the 0777-nonsense. The least common digit-base
should
 not easily be invoked "by accident".
 
 However:
 
 
 I don't like the "octal!" a lot, I prefer a syntax like the Python3 one, but
 Walter never stops moving himself forward :-)

I too was just about to ask why on earth "octal!" instead of 0o (and I didn't know about Python3). Sure, I think it's nice and clean language-wise to implement it as a template-function, but if so the same should go for 0b and 0x? Are they too deprecated in D2?

0b and 0x are not "dangerous" so there's no need to remove/deprecate them and thus cause breakage of code using them. At least 0x is quite common (certainly more common than octal numbers) so it makes sense to have this short syntax (IMHO). Cheers, - Daniel
Apr 02 2011
parent Andrej Mitrovic <andrej.mitrovich gmail.com> writes:
Guessing is a bad game. A newbie should take a look in the manuals,
which is where octal should be described.
Apr 02 2011
prev sibling parent Adam D. Ruppe <destructionator gmail.com> writes:
ulrik.mikaelsson
 I too was just about to ask why on earth "octal!" instead of 0o
 (and I didn't know about Python3).

octal! was written early last year IIRC, when changes to the language weren't yet on the table.
Apr 02 2011