digitalmars.D - Contradiction?
- James Dunne (11/11) Aug 23 2005 Direct quote from Phobos documentation:
- Stewart Gordon (15/25) Aug 23 2005 On what basis have you concluded that this is a _pointless_ wrapper?
- Don Clugston (22/45) Aug 23 2005 Yes, they are just removing the "l" from the std library names.
- Walter (7/29) Aug 24 2005 It isn't quite pointless. The idea is to remove the "hungarian notation"
- ElfQT (7/48) Aug 25 2005 Are you aware of the origin(al) of Hungarian notation?
-
Stewart Gordon
(14/20)
Aug 25 2005
- ElfQT (6/7) Aug 25 2005 Nice one. When I first read of alias and typedef,
- Hasan Aljudy (5/71) Aug 25 2005 That was brought up before ...
- Stewart Gordon (13/17) Aug 25 2005 See also
- Walter (6/11) Aug 26 2005 overloading.
- Ameer Armaly (3/19) Aug 26 2005 I agree-the popular definition accomplishes little if nothing.
- Stewart Gordon (20/29) Aug 31 2005 So, what is your opinion on Apps Hungarian? I guess the style guide
Direct quote from Phobos documentation: "No pointless wrappers around C runtime library functions or OS API functions. D provides direct access to C runtime library functions and operating system API functions. Pointless D wrappers around those functions just adds blather, bloat, baggage and bugs." std.cstream: class CFile : Stream A Stream wrapper for a C file of type FILE*. :-) Regards, James Dunne
Aug 23 2005
James Dunne wrote:Direct quote from Phobos documentation: "No pointless wrappers around C runtime library functions or OS API functions. D provides direct access to C runtime library functions and operating system API functions. Pointless D wrappers around those functions just adds blather, bloat, baggage and bugs." std.cstream: class CFile : Stream A Stream wrapper for a C file of type FILE*.On what basis have you concluded that this is a _pointless_ wrapper? Does the addition of functionality and potential robustness not constitute a point? OTOH look at std.math. Half the stuff in there looks more like pointless wrappers from where I am. Stewart. -- -----BEGIN GEEK CODE BLOCK----- Version: 3.1 GCS/M d- s:- a->--- UB P+ L E W++ N+++ o K- w++ O? M V? PS- PE- Y? PGP- t- 5? X? R b DI? D G e++>++++ h-- r-- !y ------END GEEK CODE BLOCK------ My e-mail is valid but not my primary mailbox. Please keep replies on the 'group where everyone may benefit.
Aug 23 2005
Stewart Gordon wrote:James Dunne wrote:Yes, they are just removing the "l" from the std library names. std.c.math: ------------------------- extern (C): real acosl(real); ------------------------- std.math ------------------------- real acos(real x) { return std.c.math.acosl(x); } ------------------------- Why not, in std.math: alias std.c.math.acosl acos; Or could we even extend the syntax for extern and/or alias so that you could write: alias extern (C): real acosl(real) acos; or (nicer) extern (C): alias real acosl(real) acos; and remove std.c.math entirely? There does not seem to be any purpose in having 'acosl' defined. Don.Direct quote from Phobos documentation: "No pointless wrappers around C runtime library functions or OS API functions. D provides direct access to C runtime library functions and operating system API functions. Pointless D wrappers around those functions just adds blather, bloat, baggage and bugs." std.cstream: class CFile : Stream A Stream wrapper for a C file of type FILE*.On what basis have you concluded that this is a _pointless_ wrapper? Does the addition of functionality and potential robustness not constitute a point? OTOH look at std.math. Half the stuff in there looks more like pointless wrappers from where I am.
Aug 23 2005
"Don Clugston" <dac nospam.com.au> wrote in message news:degfdm$185$1 digitaldaemon.com...Stewart Gordon wrote:It isn't quite pointless. The idea is to remove the "hungarian notation" postfixes as they are unnecessary in a language that supports overloading.OTOH look at std.math. Half the stuff in there looks more like pointless wrappers from where I am.Yes, they are just removing the "l" from the std library names. std.c.math: ------------------------- extern (C): real acosl(real); ------------------------- std.math ------------------------- real acos(real x) { return std.c.math.acosl(x); } -------------------------Why not, in std.math: alias std.c.math.acosl acos; Or could we even extend the syntax for extern and/or alias so that you could write: alias extern (C): real acosl(real) acos; or (nicer) extern (C): alias real acosl(real) acos; and remove std.c.math entirely?Aliases cannot change the type or calling convention, after all, they are merely another name for a symbol. What's in an alias? That which we call a rose by any other alias would smell as sweet.
Aug 24 2005
It isn't quite pointless. The idea is to remove the "hungarian notation" postfixes as they are unnecessary in a language that supports overloading.Are you aware of the origin(al) of Hungarian notation? http://www.joelonsoftware.com/articles/Wrong.html (Starting at "I'm Hungary" section.) ElfQT ps, I'm from hungary, by the way ;). really. "Walter" <newshound digitalmars.com> wrote in message news:dejco0$1toc$3 digitaldaemon.com..."Don Clugston" <dac nospam.com.au> wrote in message news:degfdm$185$1 digitaldaemon.com...Stewart Gordon wrote:It isn't quite pointless. The idea is to remove the "hungarian notation" postfixes as they are unnecessary in a language that supports overloading.OTOH look at std.math. Half the stuff in there looks more like pointless wrappers from where I am.Yes, they are just removing the "l" from the std library names. std.c.math: ------------------------- extern (C): real acosl(real); ------------------------- std.math ------------------------- real acos(real x) { return std.c.math.acosl(x); } -------------------------Why not, in std.math: alias std.c.math.acosl acos; Or could we even extend the syntax for extern and/or alias so that you could write: alias extern (C): real acosl(real) acos; or (nicer) extern (C): alias real acosl(real) acos; and remove std.c.math entirely?Aliases cannot change the type or calling convention, after all, they are merely another name for a symbol. What's in an alias? That which we call a rose by any other alias would smell as sweet.
Aug 25 2005
ElfQT wrote:<snip> Strong typedefs can be an even safer alternative ... up until you get bitten by this issue.... http://www.digitalmars.com/drn-bin/wwwnews?digitalmars.D.bugs/3843 Stewart. -- -----BEGIN GEEK CODE BLOCK----- Version: 3.1 GCS/M d- s:- a->--- UB P+ L E W++ N+++ o K- w++ O? M V? PS- PE- Y? PGP- t- 5? X? R b DI? D G e++>++++ h-- r-- !y ------END GEEK CODE BLOCK------ My e-mail is valid but not my primary mailbox. Please keep replies on the 'group where everyone may benefit.It isn't quite pointless. The idea is to remove the "hungarian notation" postfixes as they are unnecessary in a language that supports overloading.Are you aware of the origin(al) of Hungarian notation? http://www.joelonsoftware.com/articles/Wrong.html (Starting at "I'm Hungary" section.)
Aug 25 2005
http://www.digitalmars.com/drn-bin/wwwnews?digitalmars.D.bugs/3843Nice one. When I first read of alias and typedef, I've felt that typef should work as really a different type (so it should find the "right" overload). (Now I'm not that sure about it's design goal...) So is that still a bug? ElfQT
Aug 25 2005
ElfQT wrote:That was brought up before ... "Making Wrong Code Look Wrong" <<< that is wrong What we should do instead, is "Make wrong code produce a compiler error" , with strong typing.It isn't quite pointless. The idea is to remove the "hungarian notation" postfixes as they are unnecessary in a language that supports overloading.Are you aware of the origin(al) of Hungarian notation? http://www.joelonsoftware.com/articles/Wrong.html (Starting at "I'm Hungary" section.) ElfQT ps, I'm from hungary, by the way ;). really. "Walter" <newshound digitalmars.com> wrote in message news:dejco0$1toc$3 digitaldaemon.com..."Don Clugston" <dac nospam.com.au> wrote in message news:degfdm$185$1 digitaldaemon.com...Stewart Gordon wrote:It isn't quite pointless. The idea is to remove the "hungarian notation" postfixes as they are unnecessary in a language that supports overloading.OTOH look at std.math. Half the stuff in there looks more like pointless wrappers from where I am.Yes, they are just removing the "l" from the std library names. std.c.math: ------------------------- extern (C): real acosl(real); ------------------------- std.math ------------------------- real acos(real x) { return std.c.math.acosl(x); } -------------------------Why not, in std.math: alias std.c.math.acosl acos; Or could we even extend the syntax for extern and/or alias so that you could write: alias extern (C): real acosl(real) acos; or (nicer) extern (C): alias real acosl(real) acos; and remove std.c.math entirely?Aliases cannot change the type or calling convention, after all, they are merely another name for a symbol. What's in an alias? That which we call a rose by any other alias would smell as sweet.
Aug 25 2005
Hasan Aljudy wrote: <snip>That was brought up before ... "Making Wrong Code Look Wrong" <<< that is wrong What we should do instead, is "Make wrong code produce a compiler error" , with strong typing.See also http://www.digitalmars.com/d/archives/digitalmars/D/11512.html Stewart. -- -----BEGIN GEEK CODE BLOCK----- Version: 3.1 GCS/M d- s:- a->--- UB P+ L E W++ N+++ o K- w++ O? M V? PS- PE- Y? PGP- t- 5? X? R b DI? D G e++>++++ h-- r-- !y ------END GEEK CODE BLOCK------ My e-mail is valid but not my primary mailbox. Please keep replies on the 'group where everyone may benefit.
Aug 25 2005
"ElfQT" <dethjunk yahoo.com> wrote in message news:dekh99$1m7a$1 digitaldaemon.com...overloading.It isn't quite pointless. The idea is to remove the "hungarian notation" postfixes as they are unnecessary in a language that supportsAre you aware of the origin(al) of Hungarian notation? http://www.joelonsoftware.com/articles/Wrong.html (Starting at "I'm Hungary" section.)Yes (I like reading Joel's essays, he's very good). I was using the popular meaning of the term. I think the original meaning is gone for good, like the original meaning of "hacker" <g>.
Aug 26 2005
"Walter" <newshound digitalmars.com> wrote in message news:denmf2$1na3$2 digitaldaemon.com..."ElfQT" <dethjunk yahoo.com> wrote in message news:dekh99$1m7a$1 digitaldaemon.com...I agree-the popular definition accomplishes little if nothing.overloading.It isn't quite pointless. The idea is to remove the "hungarian notation" postfixes as they are unnecessary in a language that supportsAre you aware of the origin(al) of Hungarian notation? http://www.joelonsoftware.com/articles/Wrong.html (Starting at "I'm Hungary" section.)Yes (I like reading Joel's essays, he's very good). I was using the popular meaning of the term. I think the original meaning is gone for good, like the original meaning of "hacker" <g>.
Aug 26 2005
Walter wrote:"ElfQT" <dethjunk yahoo.com> wrote in message news:dekh99$1m7a$1 digitaldaemon.com...<snip>So, what is your opinion on Apps Hungarian? I guess the style guide ought to address both kinds. The current version of the page could be construed by the knowledgeable as condemning both. The term "Apps Hungarian", or even "Hungarian notation" with this meaning, may have gone out of fashion, but the concept certainly lives on to an extent. I've frequently used variable names such as iRow and iCol, where "i" stands for "index". And I recall seeing cbSize in some Windows API structures, which uses an example given in Joel's piece. Though others use lStructSize for the same. Stewart. -- -----BEGIN GEEK CODE BLOCK----- Version: 3.1 GCS/M d- s:- a->--- UB P+ L E W++ N+++ o K- w++ O? M V? PS- PE- Y? PGP- t- 5? X? R b DI? D G e++>++++ h-- r-- !y ------END GEEK CODE BLOCK------ My e-mail is valid but not my primary mailbox. Please keep replies on the 'group where everyone may benefit.Are you aware of the origin(al) of Hungarian notation? http://www.joelonsoftware.com/articles/Wrong.html (Starting at "I'm Hungary" section.)Yes (I like reading Joel's essays, he's very good). I was using the popular meaning of the term. I think the original meaning is gone for good, like the original meaning of "hacker" <g>.
Aug 31 2005