Discussion Thread: DIP 1043--Shortened Method Syntax--Final Review
welkam
wwwelkam at gmail.com
Fri Jul 1 15:43:03 UTC 2022
On Friday, 1 July 2022 at 01:10:28 UTC, Timon Gehr wrote:
> Go is neither simple nor uniform. The DIP is making D a bit
> simpler and more uniform.
I guess we are still talking past each other. When I was talking
about uniformity I was not talking about language rules. I was
talking about code that is in the wild and how it looks. When you
look at Go code thats in the wild it all look sameish. Thats the
uniformity I talk about and I say it has value. Simplicity also
has value. Sharing links that criticize Go`s foreign function
interface does nothing to refute my statements especially when
the blog you linked even support my statements.
>After all, Go is an easy language to pick up
The code snippets I provided were intended to show visual
similarities between function declaration and variable
declaration with assignment. Currently lambdas appear in one
context and function declarations in another. With this DIP
function declarations with lambda pattern will start to appear in
places where you can declare functions. In D`s case its
practically everywhere. That means function declarations and
variable declarations will be intermixed. Now look at this
beautiful class.
https://github.com/dlang/dmd/blob/4513d32447ddb1221581dd555b04851db6ec8afd/src/dmd/dmodule.d#L320
Imagine you need to work on it at Friday. Afternoon. While having
poor sleep the night before. And the coffee run out.
Try to count how many properties that class has. While counting
in your mind try to insert function declarations in all possible
places. See how things change.
C# 6.0 has been released in 2015. I dont believe new tutorials
were just lazy to upate.
Me personally I dont need things that make easy thing easier. I
need things that make difficult things easier.
More information about the Digitalmars-d
mailing list