Sealed classes - would you want them in D?

Neia Neutuladh neia at ikeran.org
Tue May 15 22:42:22 UTC 2018


On Tuesday, 15 May 2018 at 21:05:10 UTC, Jonathan M Davis wrote:
> Though if someone expects to be able to just jump into any 
> language and use it without reading up on how it works, they're 
> just shooting themselves in the foot. And surprisingly often, 
> that seems to be how many folks operate.

It works pretty well because programming languages tend to be 
very similar. Knowing Java, you can pretty much just write C#. 
Knowing C++ and a bit of lore, you can transition to Java pretty 
easily. But it's a lot harder to transition from C# to F#, for 
instance, or to OCaml, or METAFONT.

You might be surprised that some things are missing. You might 
not know about some things that would help you. You might be 
writing code inefficiently, and you will likely write code that's 
not idiomatic, that's hard for others to read. But you can still 
get things done.

And then you encounter things that break, and you look for other 
ways of doing that.

D's protection attributes are not that different from Java's, so 
things look the same at first. And when they're different, they 
differ in a hard-to-spot way.

There isn't much cure for this.


More information about the Digitalmars-d mailing list