5 ms·
You're totally right to ask — W++ borrows Python’s general feel (like significant indentation and dynamic typing), but its core is rooted in a C-style heritage
by sinisterMage 1y ago
You're totally right to ask — W++ borrows Python’s general feel (like significant indentation and dynamic typing), but its core is rooted in a C-style heritage due to the .NET foundation. So while let and semicolons aren’t Pythonic, the language avoids boilerplate, supports clean control flow, and aims for the readability people love about Python.
I’ll make the README clearer with a side-by-side W++ vs Python snippet to highlight the similarities better. Thanks a lot for pointing it out!
- School-Cotton 1y ago.NET by no means requires languages to be C-like, certainly not in trivial ways like having semicolons. F# for example (or for that matter, IronPython) is very unlike C. So whatever you’re trying to say here is still confusing. Honestly I think you’re leaning too hard into the “Python” marketing. Python is not just a byword for “easy-to-learn dynamically typed language”. It is its own, specific thing, and your language is not the same. You could say something like “inspired by Python” (in certain ways), but claiming to target people who “wish they could write Python on .NET” strikes me as an exaggeration (especially since you can already do that).
- sinisterMage 1y agoTotally fair point — W++ isn’t meant to be a direct Python clone, just inspired by its simplicity and clean syntax (like indentation and dynamic typing). The goal was to make scripting on .NET feel lighter and more approachable. I’ll tweak the README to make that clearer. Appreciate the honest feedback!
- smt88 1y agoI think this project is incredibly cool and lots of people will use this, but... > significant indentation and dynamic typing are absolutely the worst parts of Python. I can understand dynamic typing for scripting purposes, no real qualms there, but significant whitespace is on its face absolutely insane (significant characters that are literally invisible).
- sinisterMage 1y agoThanks! Totally fair — I know significant indentation and dynamic typing aren’t for everyone. W++ leans that way just to reduce boilerplate and keep the syntax clean for smaller scripts, but it’s not trying to be the “one true way” to write .NET code. Honestly, it’s all about exploring what a lightweight .NET scripting layer could feel like. Appreciate you checking it out
- dontlaugh 1y agoI have the opposite opinion, having written Python for many years. Dynamic typing is almost never better or necessary, but significant whitespace makes for excellent syntax with no downsides.
- pansa2 1y agoThere’s at least one downside: only having lambda expressions instead of full anonymous functions. Python’s grammar works great for expressions-inside-statements (and expressions-inside-expressions), but it can’t do statements-inside-expressions. Every attempt to support the latter turns out really ugly, at least in corner cases.
- sinisterMage 1y agoYep, W++ lambdas are statement-level on purpose My high school teacher once told me lambdas are “university-level,” so I made them the default function syntax in W++. It’s my way of saying: “nah, these aren’t scary — they belong in scripting too.” That said, I totally agree that full anonymous functions would be useful (especially for more complex logic). Might explore adding those later, but I love the message the current model sends.
- dontlaugh 1y agoIt works just fine for F#, for example. It’s doable, but it’s too late for Python.
- const_cast 1y ago> but significant whitespace makes for excellent syntax with no downsides. Biggest downside: copying and pasting code breaks in a lot of apps. Jira, Teams, and probably some others, eat whitespace for breakfast. So if a coworker gives me a code snippet they have to manually edit it (often not even possible) OR I have to, or it won't even run. And since the whitespace is significant, it can't be auto formatted. Whereas with C# you can copy the most fucked up snippet, put it in your editor and boom - auto-formatted and compiles.