Click here to Skip to main content
15,892,697 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: "Old" Skype dead for good? Pin
BillWoodruff1-May-19 21:18
professionalBillWoodruff1-May-19 21:18 
GeneralThis is why we keep backups... Pin
OriginalGriff26-Apr-19 22:16
mveOriginalGriff26-Apr-19 22:16 
GeneralRe: This is why we keep backups... Pin
RickZeeland26-Apr-19 22:53
mveRickZeeland26-Apr-19 22:53 
GeneralRe: This is why we keep backups... Pin
Mark_Wallace27-Apr-19 5:21
Mark_Wallace27-Apr-19 5:21 
GeneralRe: This is why we keep backups... Pin
OriginalGriff27-Apr-19 5:59
mveOriginalGriff27-Apr-19 5:59 
GeneralRe: This is why we keep backups... Pin
RickZeeland27-Apr-19 8:31
mveRickZeeland27-Apr-19 8:31 
GeneralMini CCCs 83 Pin
Tim Deveaux26-Apr-19 18:35
Tim Deveaux26-Apr-19 18:35 
GeneralTrying to like Rust Pin
Dean Roddey26-Apr-19 18:07
Dean Roddey26-Apr-19 18:07 
So I've been giving myself a double dose of pain trying to learn both Linux and Rust together on the side. Rust has some interesting ideas, but man some of the stuff just seems crazy to me. One I ran into tonight is that there's no such thing as a constructor.

You can create a method to gen up a structure instance and return it, but there's no overloading at all. So if you wanted to allow different sets of parameters (enormously likely and sometime quite a few) you'd have to have differently named methods for every variation which would get really awkward.

Of course you can just make all the members public and let everyone directly set them without any constraint using the {} type initialization, which is a complete NO in almost all cases in any sane world, and utterly bizarre for a language that is so otherwise anal retentive.

Or, you can use the 'builder pattern' which is the most convoluted way of constructing a structure of all and I can't imagine why anyone would want to do it (see the Builder Pattern section.)

Method Syntax[^]

I mean, it's like they are trying so hard not to be C++ that they really are making some of the most obvious stuff way harder than it needs to be. I mean, come on, a single exception to support some sort of constructor concept and to maybe make an exception on overloading for that?

Or even allow you to do a 'post validation' after a 'direct member' type initialization or something, to check for constraint violation. Or just provide a way to map a direct initialization with a given set of values provided to a method that will handle it for validation and defaulting of unprovided values (which may be different depending on the particular set of provided values, so a single fixed value isn't sufficient necessarily.)


Ultimately I'm not sure why I'm bothering since there's probably fewer Rust jobs out there than women who want to sleep with me. But I'm trying to broaden my horizons and the way C++ is going is getting scarier and scarier to me, with people now claiming that using OOP is a dangerous and outdated practice and can't possibly work (despite the fact that it's been used for decades.)

I don't want to be around to suffer through all these people re-living the 80s and finally coming out the other side a decade later finally realizing why software development back then sucked. So having some options to go elsewhere moving forward could be useful if it really goes full retard.


But of course Rust may never get beyond the interesting idea phase and get seriously used. Utlimately, though a lot of people in the software world don't want to hear it, open committees aren't great at creating good software. I think that single company driven languages like Java and C# have an advantage on that front, other things being however equal or unequal. C++ is going to end up with a language spec that requires a fork lift. And Rust may suffer in other ways from not having any real single driving force.


Other than C#, I don't know of anything else that is for real right now and for serious developers, not a glorified scripting language or something that will likely always be niche'y. But C# is still (despite a lot of efforts) quite Windows oriented. Not that I'm against that, I'm very much a Windows person. But if I'm looking to create options, doubling down on the OS isn't a great way to do that. I have no interest in going to iOS world.


Anyhoo, I'm rambling now. Sort of fried from my approximately 10,000'th straight day of programming and discouraged from arguing with anti-OO cultists.
Explorans limites defectum

GeneralRe: Trying to like Rust Pin
RickZeeland26-Apr-19 21:27
mveRickZeeland26-Apr-19 21:27 
GeneralRe: Trying to like Rust Pin
Jörgen Andersson26-Apr-19 21:34
professionalJörgen Andersson26-Apr-19 21:34 
GeneralRe: Trying to like Rust Pin
jschell27-Apr-19 8:00
jschell27-Apr-19 8:00 
GeneralRe: Trying to like Rust Pin
Jörgen Andersson27-Apr-19 8:43
professionalJörgen Andersson27-Apr-19 8:43 
GeneralRe: Trying to like Rust Pin
dandy7227-Apr-19 4:17
dandy7227-Apr-19 4:17 
GeneralHello from Saint Moritz Pin
Mike Hankey27-Apr-19 4:21
mveMike Hankey27-Apr-19 4:21 
GeneralRe: Hello from Saint Moritz Pin
Dean Roddey27-Apr-19 5:29
Dean Roddey27-Apr-19 5:29 
GeneralRe: Hello from Saint Moritz Pin
Mike Hankey27-Apr-19 8:58
mveMike Hankey27-Apr-19 8:58 
GeneralRe: Trying to like Rust Pin
MSBassSinger29-Apr-19 5:30
professionalMSBassSinger29-Apr-19 5:30 
GeneralRe: Trying to like Rust Pin
Dean Roddey29-Apr-19 7:47
Dean Roddey29-Apr-19 7:47 
GeneralRe: Trying to like Rust Pin
markrlondon29-Apr-19 7:21
markrlondon29-Apr-19 7:21 
GeneralRe: Trying to like Rust Pin
Dean Roddey29-Apr-19 7:57
Dean Roddey29-Apr-19 7:57 
GeneralRe: Trying to like Rust Pin
markrlondon29-Apr-19 8:37
markrlondon29-Apr-19 8:37 
GeneralRe: Trying to like Rust Pin
Dean Roddey29-Apr-19 8:48
Dean Roddey29-Apr-19 8:48 
GeneralRe: Trying to like Rust Pin
Member 413801729-Apr-19 7:35
Member 413801729-Apr-19 7:35 
GeneralRe: Trying to like Rust Pin
Dean Roddey29-Apr-19 7:50
Dean Roddey29-Apr-19 7:50 
GeneralRe: Trying to like Rust Pin
Member 413801729-Apr-19 8:15
Member 413801729-Apr-19 8:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.