digitalmars.D - Deprecation in core.sys.posix.termios
- H. S. Teoh (6/6) Nov 16 2012 Due to the deprecation of octal literals, core.sys.posix.termios doesn't
- =?ISO-8859-1?Q?Alex_R=F8nne_Petersen?= (10/14) Nov 16 2012 I fixed this in a pull request of mine because it happened to get in my
- H. S. Teoh (10/26) Nov 16 2012 [...]
- angel (5/5) Nov 18 2012 Converting octal to hexadecimal is kinda ugly, as _everyone_
- =?UTF-8?B?QWxleCBSw7hubmUgUGV0ZXJzZW4=?= (9/14) Nov 18 2012 The only people who need to care are druntime maintainers, and we get by...
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
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? TI 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
On Fri, Nov 16, 2012 at 07:15:01PM +0100, Alex Rønne Petersen wrote:On 16-11-2012 19:14, H. S. Teoh wrote:Yeah somebody please merge that pull request!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? TI 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).[...] On another note, I love vim/perl 1-liners: '<,'>!perl -pe's/\b(0\d+)/sprintf("0x\%04x", oct $1)/eg;' Automatically converts all octal literals into 4-digit padded hex literals in selection. :-) T -- IBM = I Blame Microsoft
Nov 16 2012
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
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