So removing constructors would give you a _very_ different language. Some nice things would be lost, but I think overall you'd have something much better. So basically it's a sneaky way of getting a whole language redesign under the constraint of only removing 1 feature :)
sizeof(Foo)? I suppose with a copy operator opt-in and default initialization, I can see constructors going the way of the dodo.
-
-
How are you going to do sizeof(Foo) when Foo is defined in foo.cpp and you can't see it? That's how most C apis work. You get a forward declared Foo in the header and all functions take Foo*. Caller can't do anything with Foo that isn't exposed through API.
-
Not saying you'd do that for 100% of your classes/structs mind you. Just that this is an option that's available if you have something that absolutely has to be policed carefully.
Keskustelun loppu
Uusi keskustelu -
Lataaminen näyttää kestävän hetken.
Twitter saattaa olla ruuhkautunut tai ongelma on muuten hetkellinen. Yritä uudelleen tai käy Twitterin tilasivulla saadaksesi lisätietoja.