www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Deprecation in core.sys.posix.termios

reply "H. S. Teoh" <hsteoh quickfur.ath.cx> writes:
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.
Nov 16 2012
next sibling parent reply =?ISO-8859-1?Q?Alex_R=F8nne_Petersen?= <alex lycus.org> writes:
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
Nov 16 2012
parent =?UTF-8?B?QWxleCBSw7hubmUgUGV0ZXJzZW4=?= <alex lycus.org> writes:
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
Nov 18 2012
prev sibling parent "angel" <andrey.gelman gmail.com> writes:
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 ?
Nov 18 2012