Giter Site home page Giter Site logo

Comments (6)

bhelyer avatar bhelyer commented on June 19, 2024

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.

bubnenkoff avatar bubnenkoff commented on June 19, 2024

I decided to ask about it on d forum http://forum.dlang.org/post/[email protected]

from volta.

mihails-strasuns avatar mihails-strasuns commented on June 19, 2024

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.

bubnenkoff avatar bubnenkoff commented on June 19, 2024

@Dicebot and what is modern approach to replace structures and classes?

from volta.

mihails-strasuns avatar mihails-strasuns commented on June 19, 2024

Define "modern" please :) For example, neither Rust nor Go have any notion of classes at all AFAIK.

from volta.

Wallbraker avatar Wallbraker commented on June 19, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.