This isn't about type system per se but about preferred style of
syntax. Original example that caused my hatred looked like this:
`let i : uint = from_str("42")`. Fortunately this has been
deprecated in favor of `parse` but same principle applies - Rust
authors encourage you to use declaration
On Tuesday, 21 April 2015 at 13:53:15 UTC, Dicebot wrote:
On Tuesday, 21 April 2015 at 13:27:48 UTC, Marc Schütz wrote:
On Monday, 20 April 2015 at 20:22:40 UTC, Jonathan M Davis
wrote:
There may be languages out there which take the the return
type into account
when overloading, but I've neve
On Tuesday, 21 April 2015 at 13:27:48 UTC, Marc Schütz wrote:
On Monday, 20 April 2015 at 20:22:40 UTC, Jonathan M Davis
wrote:
There may be languages out there which take the the return
type into account
when overloading, but I've never seen one.
Rust does, as far as I know.
And this is in
On Monday, 20 April 2015 at 20:22:40 UTC, Jonathan M Davis wrote:
There may be languages out there which take the the return type
into account
when overloading, but I've never seen one.
Rust does, as far as I know.
I don't think that the ambiguities are an insurmountable
obstacle. It's proba
On Monday, 20 April 2015 at 20:22:40 UTC, Jonathan M Davis wrote:
On Monday, April 20, 2015 19:42:30 dvic via Digitalmars-d-learn
wrote:
Thanks for your answer Jonathan. But does the return type part
of
a method
signature? I don't know what theory is claiming about that, but
for me they
are 2 d
On Monday, April 20, 2015 19:42:30 dvic via Digitalmars-d-learn wrote:
> Thanks for your answer Jonathan. But does the return type part of
> a method
> signature? I don't know what theory is claiming about that, but
> for me they
> are 2 different methods. So contextually, the best fit should
> pre
On Monday, 20 April 2015 at 18:50:31 UTC, Jonathan M Davis wrote:
On Monday, April 20, 2015 18:35:34 dvic via Digitalmars-d-learn
wrote:
Hi guys,
It seems it's possible to define different read properties,
only
differing by the return type.
Not possible. Just like pretty much any C-derived
On 4/20/15 2:50 PM, Jonathan M Davis via Digitalmars-d-learn wrote:
On Monday, April 20, 2015 18:35:34 dvic via Digitalmars-d-learn wrote:
Why is the compiler not complaining about defining 2 read
properties and it does
otherwise when using both of them?
Now, that is weird. I would fully exp
On 04/20/2015 11:35 AM, dvic wrote:
> @property string value() { return m_value; } // m_value is a string
> @property int value() { return to!int(m_value); }
Yes, as Jonathan M Davis said, that's weird.
> But when using it in writefln() or assert for example, compiler (dmd)
> complains
> about
On Monday, April 20, 2015 18:35:34 dvic via Digitalmars-d-learn wrote:
> Hi guys,
>
> It seems it's possible to define different read properties, only
> differing by the return type.
Not possible. Just like pretty much any C-derived language (C++, Java, C#,
etc.) the return type of a function is n
Hi guys,
It seems it's possible to define different read properties, only
differing by the return type.
Ex:
@property string value() { return m_value; } // m_value is a
string
@property int value() { return to!int(m_value); }
But when using it in writefln() or assert for example, compiler
(
11 matches
Mail list logo