Favourite programming language/framework/library?

fitten

Ars Legatus Legionis
52,251
Subscriptor++
Current: C# and .NET are ones I prefer. Python isn't too bad but I haven't done a whole lot with it (just a couple projects where it was being used) in comparison to my C# (and other languages) experience.

I also like C and assembly. Way back in the day, I remember feeling like a "real programmer" when I was learning assembly and C. I don't do much with either one anymore other than some playing around every so often but I'll always have a warm spot for those.
 

Ardax

Ars Legatus Legionis
19,076
Subscriptor
I love C# with LINQ and its lambda syntax. Part of it is working with it every day. Part of it is that it's a well designed language.

But there's always going to be a special place in my heart for Delphi. I enjoyed working with the language and the IDE. I liked that you also got the source code for the entire runtime library, base classes, and UI components with the IDE (except for a small number of "magic" functions implemented by the compiler). It set the benchmark for most 3rd party libraries so that they too shipped with source code. Some of that was also because even minor updates were binary-breaking changes, so it didn't lend itself to shipping precompiled units very well at all. It was hard to have questions about how something was done when you were building a program because you could always trace through the source.

You can do that in C# now too with decompilation or source packages or or what have you, but that was nice.
 

Haas Bioroid

Ars Scholae Palatinae
1,424
Subscriptor
My favorite language is Elm. It is a joy to create web apps with it. When I want to change something, or do a big refactor, the compiler is my friend. I can let my brain relax and have the compiler guide me through all the places that need changing, and when it compiles I'll know it works.
Never used Elm, but the MVU pattern they came with is great and should be the way every GUI is programmed. It's so much more clean than any MVP, MVC, MVVM pattern.
 

ShuggyCoUk

Ars Tribunus Angusticlavius
9,975
Subscriptor++
if c# gets discriminated unions and pattern matching I think I’d agitate to convert most of our f# to it except where full HM type inference was needed to not be so deep in nested generics angles that you’d rather just beat yourself to death with it.
fs is great but tooling support compared to c# just sucks now.

but I can’t translate f# with DU plus match to any reasonable c# without huge effort and much worse code.
 

Aleamapper

Ars Scholae Palatinae
1,284
Subscriptor
if c# gets discriminated unions and pattern matching I think I’d agitate to convert most of our f# to it except where full HM type inference was needed to not be so deep in nested generics angles that you’d rather just beat yourself to death with it.
fs is great but tooling support compared to c# just sucks now.

but I can’t translate f# with DU plus match to any reasonable c# without huge effort and much worse code.
C# getting type aliases so you can give tuples and generics signatures friendly names wouldn't be as effective as a full on type system upgrade but would go a long way to making them nicer to use.

If could rename my "func of ifoo to task of result-type of ireadonlycollection of ibar" to 'SuccessCallback' that would clear things up an awful lot.
 

bjn

Ars Praefectus
3,217
Subscriptor++
C# getting type aliases so you can give tuples and generics signatures friendly names wouldn't be as effective as a full on type system upgrade but would go a long way to making them nicer to use.

If could rename my "func of ifoo to task of result-type of ireadonlycollection of ibar" to 'SuccessCallback' that would clear things up an awful lot.
Not that I'm a C# coder, but stackoverflow says you can do type aliasing. I may have misunderstood your problem though.


I do like the templating type aliases in C++, I do a lot of meta programming in C++ and it helps cut down the blah.

Code:
template<class A, class B>
using VecOfPairs = std::vector<std::pair<A, B>>;

VecOfPairs<int, std::string> fred;
fred.push_back({1, "blahblah"});

Or was that the kind of thing you were asking for?
 

Aleamapper

Ars Scholae Palatinae
1,284
Subscriptor
Not that I'm a C# coder, but stackoverflow says you can do type aliasing. I may have misunderstood your problem though.


I do like the templating type aliases in C++, I do a lot of meta programming in C++ and it helps cut down the blah.

Code:
template<class A, class B>
using VecOfPairs = std::vector<std::pair<A, B>>;

VecOfPairs<int, std::string> fred;
fred.push_back({1, "blahblah"});

Or was that the kind of thing you were asking for?
Yeah, you can get close, but the trouble with the 'using' approach is that its scoped to a single file, and the trouble with the inheritance approach is that a lot of the types you'd want to alias, like Func<...>, are sealed, so you can't inherit from them.
 

Haas Bioroid

Ars Scholae Palatinae
1,424
Subscriptor
if c# gets discriminated unions and pattern matching I think I’d agitate to convert most of our f# to it except where full HM type inference was needed to not be so deep in nested generics angles that you’d rather just beat yourself to death with it.
fs is great but tooling support compared to c# just sucks now.

but I can’t translate f# with DU plus match to any reasonable c# without huge effort and much worse code.

C# has had pattern matching for 4 or 5 versions already, coming along with the switch expression (not to be mistaken for the good old switch statement, though it also can use pattern matching).
 

fitten

Ars Legatus Legionis
52,251
Subscriptor++
Yeah, you can get close, but the trouble with the 'using' approach is that its scoped to a single file, and the trouble with the inheritance approach is that a lot of the types you'd want to alias, like Func<...>, are sealed, so you can't inherit from them.
I haven't tried, but can you use the global usings for type aliasing?
 
  • Like
Reactions: quarlie

Aleamapper

Ars Scholae Palatinae
1,284
Subscriptor
I haven't tried, but can you use the global usings for type aliasing?
Oh cool, that works! It's still a bit nasty though, the declaration has to at the top of the class that defines it before all other usings, you can't use it outside that assembly, and it isn't namespaced, so it pollutes that assembly somewhat.

A proper way to do it would be nice!
 

hanser

Ars Legatus Legionis
41,687
Subscriptor++
C# has had pattern matching for 4 or 5 versions already, coming along with the switch expression (not to be mistaken for the good old switch statement, though it also can use pattern matching).
Pattern matching and discriminated unions go together though. Without DUs, C#'s pattern matching is nice syntactic sugar that increases the semantic density of the code you can write, but it's not as expressive and powerful as ML's DUs + pattern matching.
 
  • Like
Reactions: ShuggyCoUk

ShuggyCoUk

Ars Tribunus Angusticlavius
9,975
Subscriptor++
C# getting type aliases so you can give tuples and generics signatures friendly names wouldn't be as effective as a full on type system upgrade but would go a long way to making them nicer to use.

If could rename my "func of ifoo to task of result-type of ireadonlycollection of ibar" to 'SuccessCallback' that would clear things up an awful lot.
Is just declaring a deflagrate type for it not sufficient ?

it’s not perfect (a compatible seeming Func/Action equivalent will not seamlessly convert, but lambdas will
 

hunting_for_p

Smack-Fu Master, in training
7
Subscriptor
I think I'll always have a soft spot in my heart for Matlab. The biggest reasons: easy to access interactive debugging, great plotting and visualization tools, and reasonably compact notation (particularly for linear algebra).

Of course, Python completely stole their lunch money and I mostly use numpy nowadays, but sometimes I'll fire up Octave to do some very early stage experiments. That said, Python has been growing steadily on me too, primarily because of its own easy to access interactive debugging. If you take away my PyCharm I'd probably go back to being a hater...
 

Aleamapper

Ars Scholae Palatinae
1,284
Subscriptor
Yes. Delegate type. Autocorrect fail.

Which things don’t get handled by delegates?
Any type signature that isn't a func/action/delegate. I get that there are numerous workarounds for individual special cases, I'd just like one, single, universal and consistent way of saying
Code:
typealias FriendlyType = (IUgly<Nasty<Stuff,Thing>, Type>, MaybeATupleToo)

(yes, I agree that often a named tuple should actually be a record/struct or whatever, thats beside the point!)
 

ShuggyCoUk

Ars Tribunus Angusticlavius
9,975
Subscriptor++
Any type signature that isn't a func/action/delegate. I get that there are numerous workarounds for individual special cases, I'd just like one, single, universal and consistent way of saying
Code:
typealias FriendlyType = (IUgly<Nasty<Stuff,Thing>, Type>, MaybeATupleToo)

(yes, I agree that often a named tuple should actually be a record/struct or whatever, thats beside the point!)
Ah your not just talking about functions, you’re talking about anything that’s a type.

Right. You want f# for that. Then there’s even more things you can alias away :)

This is a joke. Sort of.

Within a file you can do that in c#. Perhaps even with project level imports, I’ve never tried.
 

Ajar

Ars Tribunus Angusticlavius
8,904
Subscriptor++
I think I'll always have a soft spot in my heart for Matlab. The biggest reasons: easy to access interactive debugging, great plotting and visualization tools, and reasonably compact notation (particularly for linear algebra).

Of course, Python completely stole their lunch money and I mostly use numpy nowadays, but sometimes I'll fire up Octave to do some very early stage experiments. That said, Python has been growing steadily on me too, primarily because of its own easy to access interactive debugging. If you take away my PyCharm I'd probably go back to being a hater...
If you pine for Matlab, it's worth taking a look at Julia. Debugging is very different due to the nature of the language, but there's a decent support ecosystem that works pretty well. For expressing math concepts in code, it's hard to beat.
 
  • Like
Reactions: hunting_for_p

zyyn

Ars Praetorian
465
Subscriptor++
I've been using Flutter for a year now and it's pretty cool. The whole immutable state thing is really neat. And the declarative style of laying out the UI is very intuitive. The tooling is great, too. Of all the IDEs I've used Android studio seems to break the least often. Some of my previous cross-platform framework experience was with Xamarin.Forms and I'm still in awe of how much better Flutter is in every possible way. We just barely managed to dodge the Maui bullet.

For a language I think I still like C# the best, or maybe Kotlin.
 

koala

Ars Tribunus Angusticlavius
7,579
My favorite programming language is bash.
Bash:
while true ; do curl --silent https://www.grover.com/es-es/search?filter=search%3Dthinkpad | htmlq '[data-testid=product-card]' | grep -v Agotado | { while read l ; do echo $(echo $l | htmlq h2 -a title) $(echo $l | htmlq p[data-testid=product-description] -t) ; done } >out ; mv out $(date -Ihour | tr -d ':-T+' )$(cat out | md5sum | sed "s/..$//") ; sleep $((60*60)) ; done

Yup, that's unmaintainable and flaky. But this will be running for about a week, and while I suppose there are better ways to do it, I got it running in a few minutes.
 

bjn

Ars Praefectus
3,217
Subscriptor++
Bash:
while true ; do curl --silent https://www.grover.com/es-es/search?filter=search%3Dthinkpad | htmlq '[data-testid=product-card]' | grep -v Agotado | { while read l ; do echo $(echo $l | htmlq h2 -a title) $(echo $l | htmlq p[data-testid=product-description] -t) ; done } >out ; mv out $(date -Ihour | tr -d ':-T+' )$(cat out | md5sum | sed "s/..$//") ; sleep $((60*60)) ; done

Yup, that's unmaintainable and flaky. But this will be running for about a week, and while I suppose there are better ways to do it, I got it running in a few minutes.
At least its not perl.
 

AdrianS

Ars Scholae Palatinae
1,326
Subscriptor
<Flameproof suit on>

Some of my work and some of my hobby coding is embedded programming, on old-school integer processors.

I love coding in that world in C / ASM.
I know it's inefficient in modern terms, and takes a skill-set that's rare nowadays, but after wrestling with yet another windows update, I love coding to the hardware.

There is no OS.
There is no GUI.
There is no mass storage system.
There is no virtual memory.
Or other apps running.
Or garbage collection.

There is no-one to blame but me.