View mode: basic / threaded / horizontal-split · Log in · Help
November 16, 2012
Deprecation in core.sys.posix.termios
Due to the deprecation of octal literals, core.sys.posix.termios doesn't
compile anymore. But because this is in druntime, we can't use
std.conv.octal. What should be done about this?


T

-- 
Designer clothes: how to cover less by paying more.
November 16, 2012
Re: Deprecation in core.sys.posix.termios
On 16-11-2012 19:14, H. S. Teoh wrote:
> Due to the deprecation of octal literals, core.sys.posix.termios doesn't
> compile anymore. But because this is in druntime, we can't use
> std.conv.octal. What should be done about this?
>
>
> T
>

I fixed this in a pull request of mine because it happened to get in my 
way too: https://github.com/D-Programming-Language/druntime/pull/340

(I really wish someone would review/merge that pull request.)

Generally, we just turn octal literals into hex literals in druntime 
(and write the octal number in a comment if necessary).

-- 
Alex Rønne Petersen
alex@lycus.org
http://lycus.org
November 18, 2012
Re: Deprecation in core.sys.posix.termios
Converting octal to hexadecimal is kinda ugly, as _everyone_ 
knows / remembers these constants as octal.
Possibly 'octal!' should be defined in druntime ?
By the way, did you look for other occurences of octal numbers, 
termios is surely not the only place ?
November 18, 2012
Re: Deprecation in core.sys.posix.termios
On 18-11-2012 20:15, angel wrote:
> Converting octal to hexadecimal is kinda ugly, as _everyone_ knows /
> remembers these constants as octal.
> Possibly 'octal!' should be defined in druntime ?
> By the way, did you look for other occurences of octal numbers, termios
> is surely not the only place ?

The only people who need to care are druntime maintainers, and we get by 
fine with hexadecimal numbers so far. I wouldn't be worried.

And yes, I did get rid of all octal literals in my pull request, at 
least to the point where things compile.

-- 
Alex Rønne Petersen
alex@lycus.org
http://lycus.org
Top | Discussion index | About this forum | D home