On Friday, 12 April 2019 at 10:01:40 UTC, wjoe wrote:
It's not entirely related but another use of the underscore is
to make integers more readable. E.g.:
int x = 1_000_000_000_000;
And, I suspect, to make numbers easier to translate between
English Canadian and French Canadian:
On Monday, 8 April 2019 at 12:16:13 UTC, Adam D. Ruppe wrote:
On Monday, 8 April 2019 at 11:58:49 UTC, Ron Tarrant wrote:
And while I'm asking, does an underscore have special meaning
when used either at the beginning or end of a variable name?
Nothing special there, you are allowed to use
On Monday, 8 April 2019 at 14:27:11 UTC, JN wrote:
Java uses @ for annotations too. Pascal uses @ for "address
of", like & in D.
Just one of the many reasons I balked at Java... many MANY
reasons.
Thanks, JN.
On Monday, 8 April 2019 at 14:19:04 UTC, XavierAP wrote:
On Monday, 8 April 2019 at 11:58:49 UTC, Ron Tarrant wrote:
And while I'm asking, does an underscore have special meaning
when used either at the beginning or end of a variable name?
In D, @ is used as Adam has explained as a prefix
On Monday, 8 April 2019 at 14:19:04 UTC, XavierAP wrote:
The only other example of language using @, in an almost but
not quite completely different way, is C#. It's also a prefix
that allows you to define names that would collide with
reserved words, for example string @class = "menu"; Of
On Monday, 8 April 2019 at 11:58:49 UTC, Ron Tarrant wrote:
And while I'm asking, does an underscore have special meaning
when used either at the beginning or end of a variable name?
In D, @ is used as Adam has explained as a prefix indicating
attributes (either user-defined ones or,
Well, that was quick!
Thanks Adam, Kagamin, and Alex.
On Monday, 8 April 2019 at 11:58:49 UTC, Ron Tarrant wrote:
Would someone please tell me what an at sign (@) means when
it's used like this:
bool isLeaf() @property
In that case, it means nothing. We just defined the word to be
`@property`, with the @ included. So it is just part of the
https://dlang.org/spec/function.html#property-functions
On Monday, 8 April 2019 at 11:58:49 UTC, Ron Tarrant wrote:
This is frustrating and makes me feel like a complete newb.
Worse, it's impossible to search for. Ever try Googling a
single character?
The D documentation also doesn't seem to explain the meaning of
this or any other token. Sure,
This is frustrating and makes me feel like a complete newb.
Worse, it's impossible to search for. Ever try Googling a single
character?
The D documentation also doesn't seem to explain the meaning of
this or any other token. Sure, most of them are obvious, but this
one eludes me. All I can
On Wednesday, 27 September 2017 at 14:34:06 UTC, Eugene Wissner
wrote:
On Wednesday, 27 September 2017 at 14:23:01 UTC, Ky-Anh Huynh
wrote:
See also the following chapter in Ali's book:
http://ddili.org/ders/d.en/templates.html
This chapter is what hooked me with D. Naming that chapter as
On Wednesday, 27 September 2017 at 17:58:27 UTC, Ali Çehreli
wrote:
On 09/27/2017 08:33 AM, Ky-Anh Huynh wrote:
> [...]
Wissner wrote:
> [...]
The fact that such an important operator is explained so late
in the book is due to the book's strong desire to have a linear
flow.
[...]
ustad,
On 09/27/2017 03:06 PM, Mengu wrote:
ustad, guess you can still write the new ed. :-)
Since you're still around, one of these days... :)
Ali
On 09/27/2017 08:33 AM, Ky-Anh Huynh wrote:
> On Wednesday, 27 September 2017 at 14:34:06 UTC, Eugene Wissner wrote:
>>
>> See also the following chapter in Ali's book:
>> http://ddili.org/ders/d.en/templates.html
>
> Thanks a lot. I will keep reading :)
The fact that such an important operator
On Wednesday, 27 September 2017 at 14:23:01 UTC, Ky-Anh Huynh
wrote:
Can you please explain and give any link where I can learn more
about these things?
Thanks a lot.
http://nomad.so/2013/07/templates-in-d-explained/
On Wednesday, 27 September 2017 at 14:34:06 UTC, Eugene Wissner
wrote:
See also the following chapter in Ali's book:
http://ddili.org/ders/d.en/templates.html
Thanks a lot. I will keep reading :)
On Wednesday, 27 September 2017 at 14:23:01 UTC, Ky-Anh Huynh
wrote:
Hi,
I am from Ruby world where I can have `!` (or `?`) in method
names: `!` indicates that a method would modify its object
(`foo.upcase!` means `foo = foo.upcase`). ( I don't know if
there is any official Ruby
There are two types of arguments in D. The runtime one (which you are
well aware of) and the compile time one. A compile time argument is a
constant passed in during construction of a symbol.
But here is the thing, it isn't just limited to functions, you can have
it on classes as well.
---
Hi,
I am from Ruby world where I can have `!` (or `?`) in method
names: `!` indicates that a method would modify its object
(`foo.upcase!` means `foo = foo.upcase`). ( I don't know if there
is any official Ruby documentation on this convention though. )
In D I see `!` quite a lot. I have
20 matches
Mail list logo