LogicHound
Joined 1 year ago
Joined 1 year ago
> This article is putting a metric of efficiency, while ignoring the reasons why things like a dog may have less efficent locomotion over perfectly flat terrain, because there are very few natural landmarks that have perfectly flat terrain.
You can't control for this stuff and measure it really.
> I'd love to see a deeper comparison, how does efficiency of locomotion compare between animals within different types of environments, obstacles, etc.
Again this is difficult to control for. Other than particular areas where bicycle won't work (and there are very few places where that would apply), the bicycle is still likely to win out. Even if you have to get off occasionally to navigate over/under/around an obstacle you get all the benefits of efficiency for the majority of the time.
This is why the single var pattern used to be recommended.
It isn't any one language feature it is the mentality of both the developer community and Microsoft.
> I agree that they should not add new stuff lightly
It seems though kinda do though. I am not the first person to complain that they add syntactic sugar that doesn't really benefit anything.
e.g. https://devclass.com/2024/04/26/new-c-12-feature-proves-cont...
I have a raft of other complaints outside of language features. Some of these are to do with the community itself which only recognise something existing when Microsoft has officially blessed it, it is like everyone has received the official permission to talk about a feature. Hot Reload was disabled in .NET 6 IIRC for dubious reasons.
Quite possibly. I would imagine it depends on the forest. I've been in forested areas on the mountain bike and you can cycle through these areas fine.
> It's the classic physics issue - you are ignoring air resistance, but in this case you are ignoring everything other than a perfectly paved road.
Rolling resistance is mainly down to the types of tyres used, how wide they are and how much they are inflated. Surface doesn't make that much of a difference IMO unless it is on a really lose surface e.g. loose gravel, mud or ice.
The biggest improvements to cycling efficiency is usually either being in a recumbent bicycle (less air resistance as you are led down) or by being in a more more Aero position with lycra on. But air resistance only becomes a big thing past 20mph or if you are wearing clothing that is really baggy.
Bicycles are the most efficient forms of transport in energy per mile. They are often the fastest in built up areas as well.
> Would you say that these samples show no benefit to using the "is" operator?
I didn't say no benefit. I said dubious benefit.
I didn't really want to get into discussing specific operators, but lets just use your date example:
if (date is { Month: 10, Day: <=7, DayOfWeek: DayOfWeek.Friday }) { ... }
This following would do the same thing before the is operator: static bool IsFirstFridayOfOctober(DateTime date)
{
return date.Month == 10
&& date.Day <= 7
&& date.DayOfWeek == DayOfWeek.Friday;
}
And then: if IsFirstFridayOfOctober(date) {
...
}
I understand it is more verbose. But do we really need a new operator for this? I was getting on fine without it.Each release there seems to be more of these language features and half the time I have a hard time remembering that they even exist.
Each time I meet with other .NET developers either virtually or in Person they all seem to be salivating over this stuff and I feel like I've walked in on some sort of cult meeting.
It looks like it is intended to run Windows Arm.
I've also had it suggest solutions e.g. "This C++/OpenGL code doesn't run in wayland can you suggest some solutions".
Other stuff like generating tests is hit and miss.
I find many of languages I am constantly fighting with dependency managers, upgrades and all sorts of other things.
e.g. Just a very simple example to illustrate the point
if (customer != null)
{
customer.Order = GetCurrentOrder();
}
vs if (customer is not null)
{
customer.Order = GetCurrentOrder();
}
Is there really any benefit in adding "is/is not"? I would argue no. So I categorise that as being of "dubious benefit" and there are many similar small features, keywords etc. that get added each release where they might save a few lines of code somewhere but I've never seem them used that often.That was my original comment. It is pretty easy to that to assume that when someone says "none" in a subsequent comment they mean "almost none" following that statement.
I once mentioned both these concepts to a room of C# developers. Two of them were senior to me and it was a blank expression from pretty much everyone.
> yet functional programming languages are still considered fringe tech for some reason.
You can use the same concepts in non-functional programming languages without having to buy into all the other gumpf around functional programming languages. Also other programming languages have imported functional concepts either into the language itself or into the standard libraries.
Past that. It is very rare to be able to get a job using them. The number of F# jobs I've seen advertised over the last decade, I could count on one hand.