talon, (edited )
@talon@dragonscave.space avatar

In C# you can do:
someVar is > 10 and < 100 and not 60
and I think that's beautiful.

x0,
@x0@dragonscave.space avatar

@talon Wait, it supports that kind of constraint? That's like prolog shit! If you carefully express your constraints with variables that aren't fully initialized in some languages that can do this you can use those variables as a solver with stupid powerful lazy evaluation.

miki,
@miki@dragonscave.space avatar

@x0 @talon Not a C# expert by any means, but I think this is just pattern matching. Pattern matching definitely is cool though.

x0,
@x0@dragonscave.space avatar

@miki @talon Oh yeah that, Python can apparently do that too now except I don't think it's that good yet? When I took a class called design of programming languages we worked with something called Oz which could. It was like pascal and lisp and prolog had a baby. Everything was recursive, recursion was how you implemented fucking loops.

miki,
@miki@dragonscave.space avatar

@x0 @talon That's functional programming for you, read "structure and interpretation of computer programs" if you're into that sort of stuff. I never actually fully finished it myself, but the parts I managed to read were already quite fascinating.

KyleBorah,

@talon That’s just idiotic. The last is not equal to six is completely useless. If a number is greater than 10 and less than 100 of course it’s not gonna be six.

talon,
@talon@dragonscave.space avatar

@KyleBorah fixed

talon,
@talon@dragonscave.space avatar

@KyleBorah Also maybe don’t call people idiots for something that might be a mistake? Just a little thought.

talon,
@talon@dragonscave.space avatar

Show me something that a programming language you know can do that you just simply find syntactically pleasing!

emilvolk,
@emilvolk@furry.engineer avatar

@talon malloc in C /hj

talon,
@talon@dragonscave.space avatar

@emilvolk ok but now you gotta explain which half is the joke ;)

emilvolk,
@emilvolk@furry.engineer avatar

@talon well, I personally like being responsible for memory, but too many others screw it up that you have literal national security problems as a result

talon,
@talon@dragonscave.space avatar

@emilvolk hey I don't judge. If you like writing C, then by all means you should be able to write C in peace. Or Zig!

emilvolk,
@emilvolk@furry.engineer avatar

@talon or, conversely, Java or Python. Ultimately they’re all tools

talon,
@talon@dragonscave.space avatar

@emilvolk I recently looked at Java again because I stumbled across something that I've been looking for for years, and was quite pleasantly surprised. At some point pragmatism just wins out for me, and if that thing I wanted is written in Java/for the JVM, then there's no reason for me not to just... use it. I want a thing done, this does the thing, good enough for me!

talon,
@talon@dragonscave.space avatar

@emilvolk uh... this is a library. Not an end user app. That was probably not very clear. So choice of libraries/tools influenced me using Java again. And that's fine!

TheQuinbox,

@talon string[]@ opImplConv() const property { return this.text.split("\n");}
Allows you to cast your type to a string[]@ in Angelscript implicitly. There's also opImplCast, which does it explicitly.

talon,
@talon@dragonscave.space avatar

@TheQuinbox oh that's pretty neat!

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • DreamBathrooms
  • mdbf
  • osvaldo12
  • magazineikmin
  • cubers
  • rosin
  • thenastyranch
  • Youngstown
  • tacticalgear
  • slotface
  • khanakhh
  • kavyap
  • InstantRegret
  • Durango
  • JUstTest
  • everett
  • ethstaker
  • modclub
  • anitta
  • cisconetworking
  • tester
  • ngwrru68w68
  • GTA5RPClips
  • normalnudes
  • megavids
  • Leos
  • provamag3
  • lostlight
  • All magazines