C/C++/C#/Go/Java/Obj-C/Rust/Swift etc more Static Strongly-Typed, Compiled Language Programming [Official Discussion Thread]

Which Languages can you Program in ? (max 5)


  • Total voters
    13

null

...
Joined
Nov 12, 2014
Messages
29,222
Reputation
4,894
Daps
46,431
Reppin
UK, DE, GY, DMV
I've been programming for a long time. I picked Rust because I had been hearing good things about it, and I had a project that I wasn't far in to that I had started in C++, and I decided that this was a good time to learn Rust, so after I go through the book I'm going to port that project to Rust.

ok cool. i might learn rust at some point in the future. it will be either rust or go.
 

Spatial Paradox

All Star
Supporter
Joined
May 16, 2012
Messages
2,290
Reputation
1,120
Daps
12,145
Reppin
Brooklyn
A thread for more enterprise, compiled, statically bound, strongly typed languages.
Java, C++, C#, C, Objective C, Swift and other similar languages.

Compiler Explorer - to see corresponding assembly code on the fly
Quick C++ Benchmarks - to see assembly code and performance benchmarks
Wandbox - sandbox for multiple languages including C++

Shout out to any other iOS devs on here :salute:

I've started learning Rust too for a side project I've been thinking about tackling. Some of its concepts take a little effort to wrap my head around. But on the flip side, I think knowing Swift has actually made it easier for me to pick up on certain aspects of the language. I'm liking it so far.
 

null

...
Joined
Nov 12, 2014
Messages
29,222
Reputation
4,894
Daps
46,431
Reppin
UK, DE, GY, DMV
Shout out to any other iOS devs on here :salute:

I've started learning Rust too for a side project I've been thinking about tackling. Some of its concepts take a little effort to wrap my head around. But on the flip side, I think knowing Swift has actually made it easier for me to pick up on certain aspects of the language. I'm liking it so far.

yeah rust looks like a really cool and modern language. c++ is a bit of a mess now so it makes sense that someone would create a (c++)++.

it's interesting that they say that heap veriables are auto-deleted without the need for reference counting.

it would appear to me that that means that casting pointers to ints/longs and back (as people do in c/c++) while the original goes out of scope is not permitted. or at least could cause problems. to take it one step further where those int ptrs are written disk or shared memory and all references go out of scope.

or does rust somehow keep track?

i found this discussion which suggests that in can be problematic.

"Transmuting pointers to integers (i.e., not going through the regular cast) is a problem. This is demonstrated by the following silly example:"

-

c++ is far too big and they keep adding to it :picard:. all the conflicting and complex rules increases the chance of writing buggy code.
 
  • Dap
Reactions: F K

F K

All Star
Joined
Jan 13, 2017
Messages
3,204
Reputation
480
Daps
10,121
The funniest thing about Rust evangelists is that they think they are going to win in embedded systems by beating out c++ but many of the embedded guys I know have even refused to move onto c++ from c :pachaha:.

I'm not a good enough dev to even worry about these things :mjcry:. Garbage Collector 4 life for me .
 

F K

All Star
Joined
Jan 13, 2017
Messages
3,204
Reputation
480
Daps
10,121
yeah but you know c# devs believe that windows is an acceptable operating system ... :picard: i'd imagine that most people do.

it depends on what you were exposed to on the way up.

i mean javascript (web centric and barely a language) is above C++ (control systems, supercomputers, flight systems, operating systems) in that list.
c++ is the goat language for output but we both know the developer experience can get grimy.
 

null

...
Joined
Nov 12, 2014
Messages
29,222
Reputation
4,894
Daps
46,431
Reppin
UK, DE, GY, DMV
What you coding in now?

I have been working with C++ and threads.

In particular the c++11 threading model the effects fences, barriers and cache memory ines have on consistency and throughput. part of that is lockless concurrency as well. then further to that the way chipsets are moving towards a standard that allows for barriers and fences with low overhead. in particular the aim is low read overhead with acceptable write overhead.

there are some good c++ con talks about this online. two vids on atomic weapons by sutter are good. total about 2h30m.

plus i went though the majority of this book

41kA1avGCYL._SX198_BO1,204,203,200_QL40_ML2_.jpg


the big issue I see with c++ threads is how to interrupt threads (not cond var waits).

in c#/java that's pretty straightforward.

i need to look at it a bit more.

Thoughts on learning Go vs Rust for future career prospects if you already know some Python?

I read that python to golang is easier than python to rust.

i think I will start learning rust towards the end of the year as my main new compiled language. the fact that it will be used in the linux kernel and on android is a good sign to me. also rust scores prety high here Stack Overflow Developer Survey 2020 and has since 2016 as most loved language.

i should be in the US by then so cannot be sure. it depends on other real world factors.

i prefer technical rather than scripting-like languages/syntax and so I think rust is a natural fit for me.

c++ is a mess now. even after all these changes ranges are coming soon - which will disriupt the use of iterators for range definitions (even in the STL). then on top of that transforms incl lazy transforms which is going to be another cycle of relearning.

to be fair i think i will need to revisit the question of rust vs. golang eventually.

what are your thoughts?

from what I have read some people think rust is hard to learn, esp. the borrow semantics and writing elegant idiomatic code.

rust's concurrency model relies on the compiler statically informing you of errors. is that tried and tested enough for business to rely on it when c++/c work already?

dunno.
 
Top