July 10, 2005 Re: June 2005 LOLQs for D, D.gnu, digitalmars.D, digitalmars.D.announce, digitalmars.D.bugs, digitalmars.D.learn and digitalmars.empire | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andrew Fedoniouk | In article <dap6di$2skm$1@digitaldaemon.com>, Andrew Fedoniouk says... > >"other languages don't have const" >All languages of enterprise programming level (whatever it means) >has concept of either immutable basic/builtin reference types (String, >DateTime) with their immutabilty enforcement or have a concept of const. >Either shalow or deep. > >From known to me languages, only VB has no such concept at all. > Visual Basic (VB) has a "Const" keyword that works well with Strings and primitive datatypes, and it also has a "ByVal" and "ByRef" for parameters passed into functions that works too. So, I'm not sure why you've fingered VB as a simple language with no concept of a constant non-changing value. David L. ------------------------------------------------------------------- "Dare to reach for the Stars...Dare to Dream, Build, and Achieve!" ------------------------------------------------------------------- MKoD: http://spottedtiger.tripod.com/D_Language/D_Main_XP.html |
July 10, 2005 Re: June 2005 LOLQs for D, D.gnu, digitalmars.D, digitalmars.D.announce, digitalmars.D.bugs, digitalmars.D.learn and digitalmars.empire | ||||
---|---|---|---|---|
| ||||
Posted in reply to David L. Davis | "David L. Davis" <SpottedTiger@yahoo.com> wrote in message news:dapqn2$d0b$1@digitaldaemon.com... > In article <dap6di$2skm$1@digitaldaemon.com>, Andrew Fedoniouk says... >> >>"other languages don't have const" >>All languages of enterprise programming level (whatever it means) >>has concept of either immutable basic/builtin reference types (String, >>DateTime) with their immutabilty enforcement or have a concept of const. >>Either shalow or deep. >> >>From known to me languages, only VB has no such concept at all. >> > > Visual Basic (VB) has a "Const" keyword that works well with Strings and > primitive datatypes, and it also has a "ByVal" and "ByRef" for parameters > passed > into functions that works too. So, I'm not sure why you've fingered VB as > a > simple language with no concept of a constant non-changing value. Const keyword in VB plays pretty much the same role as in D except one thing - it supports String type also. ByVal and ByRef is the same as 'in' and 'inout' in D except of ByVal makes a copy of String values which is not so realistic to use. ByVal String inside fucnction is not an immutable value/reference. Forgot to mention. I am speaking about the VB - VB version 6 and not VB.NET as it is different language. Andrew. |
Copyright © 1999-2021 by the D Language Foundation