Comments (6)
Thank you for your consideration. Do you have a link to the broader context of that quote? As is, I can't see why it's considered sub-optimal.
from volta.
I decided to ask about it on d forum http://forum.dlang.org/post/[email protected]
from volta.
I don't remember Andrei rationale but I also don't like struct and class separation in D. The reason is that it couples together several orthogonal semantic choices while real applications are much more versatile. Saying that classes are strictly heap types leads to hacks like scoped
. Forcing magical reference semantics leads to ugly Rebindable
workaround when you need to reassign const class reference. The issue with struct destructors not being run if it is allocated on heap is also indirectly caused by such split (because it was functionality not expected and thus not tested).
from volta.
@Dicebot and what is modern approach to replace structures and classes?
from volta.
Define "modern" please :) For example, neither Rust nor Go have any notion of classes at all AFAIK.
from volta.
Yes it conflates a lot of issues...
scope
is something you want tho, being able to say if can or can not keep reference/pointer to a object/memory is nice. Proper scope
not D scope
. The Rebindable
comes from limiting const
syntax and over templitization of the language.
Well at least go have solved polymorphism in a different way, so they don't need traditional classes.
from volta.
Related Issues (20)
- Volt vs D HOT 7
- Volt site CMS HOT 1
- Safe int HOT 2
- take ideas from Julia and Nim languages HOT 12
- Does Volta need foreach_revese? HOT 6
- Change logical operators to word HOT 1
- Feature modular/configurable runtime HOT 6
- Ideas, queries and issues HOT 5
- Coming from D guide HOT 9
- About Volta web site
- Pattern matching HOT 1
- Function decorator bloat HOT 13
- Distribute the compiler with all dll that are needed HOT 1
- error: No valid LLVM Toolchains found! HOT 5
- is Volt development stopped ? HOT 2
- Build failed (macOS) [can be fixed] HOT 9
- Volt is BROKEN and should be fixed HOT 2
- main.volt:1:1: error: can't find module 'core.compiler.defaultsymbols'.
- error while building hello file from Getting Set Up HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from volta.