bool and int

rbowman bowman at montana.com
Tue Jan 24 22:25:08 EST 2023


On Wed, 25 Jan 2023 12:14:50 +1100, Chris Angelico wrote:


> So the problem isn't that I'm trying to write Python in C#, but that I'm
> trying to write code that would work on pretty much *any other C-family
> language*, but doesn't work on C#. I could use those techniques in
> plenty of C-derived and C-inspired languages, but nooooo not in C#,
> despite looking very much C-inspired. Unfortunately the truth is that C#
> is not *actually* C-inspired; it's really Microsoft Java, so it has all
> the stupidities of Java:

I have the installation media for Visual J++ around here someplace. It 
lasted for a few years before Sun sued for non-compliance. There 
definitely is some of its DNA in C#. 

I prefer C# to C++ but it does have annoyances. It's only a warning that 
can be pragma'd but

string foo;  

complaining that foo may be null unless you shut it up with

string? foo;

can be frustrating. It has a germ of a good idea for structs (classes) 
where some of the members are optional. 

The bool hoops definitely are another sore point after a few decades of C.

I can switch gears for Python but the first day or two is painful. I was 
getting a bit frustrated until I remembered the range() thing. 


More information about the Python-list mailing list