You are a stupid programmer, you can't have that
Paulo Pinto
pjmlp at progtools.org
Mon Aug 9 13:38:36 UTC 2021
On Monday, 9 August 2021 at 12:14:27 UTC, Dukc wrote:
> On Sunday, 8 August 2021 at 09:49:41 UTC, Dylan Graham wrote:
>> On Saturday, 7 August 2021 at 12:15:15 UTC, IGotD- wrote:
>>> [snip]
>>
>> Zig does stuff like this and it's why I can't take that
>> language seriously. At all. To paraphrase what I was told by
>> Zig's community and BDFL: "if there's multiple ways to do
>> something then obviously dumb dumb programmer will get it
>> completely wrong".
>>
>> I like programming languages that help me catch bugs (D or
>> Rust), not languages that treat me like a 3 year old.
>
> To be fair, I don't think lack of unsigned integers is a big
> deal. Because many operators do not care whether it's signed or
> unsigned that's being used, and for the remaining ones (divide,
> modulus, right shift) the language can define standard library
> functions.
>
> But I do agree in general that either Java does not have much
> faith in programmer ability, or they value implementation
> simplicity much more than readability. I can see no other
> reasons for disallowing free functions or requiring curly
> braces for every singe `if` or `while` statement. Or for
> requiring repeating `public` on every public member instead of
> just before the first one as in C++ (Haven't done much Java,
> forgive me if I recall the details wrong).
You can kind of fake free functions with import static or method
references.
Compound statements aren't required for if/while, only a
convention inherited from C best practices, goto fail from Apple
showed the world why they are a good idea.
Class members without visibility specificier default to package
visibility, so they are public to remaining classes on the
package or module (as of Java 9+).
More information about the Digitalmars-d
mailing list