Skip Navigation
Why make it complicated?
  • True, but that requires writing an additional definition and hides the parameter types, which can be very interesting, and you'd need a typedef for every new param combination I guess. It feels like a solution for a problem that could have been avoided by a better signature syntax in the first place.

  • Why make it complicated?
  • I don't think it's that uncommon. Let's say you have a function that handles a request. A common use case is to add permission checks before applying that function. You can write a generic permission check a bit like this:

    func NeedsPermission(f func(Request) (Response, error), perm string) func(Request) (Response, error) {
        return func(r Request) (Response, error) {
            if !check(r, perm) {
                return nil, NewPermError(perm)
            }
            return f(r)
        }
    }
    
    // elsewhere
    Bar := NeedsPermission(Foo, "superman")
    

    This would allow you to separate the permission check logic from the business logic. Though to be fair, in Go they prefer to keep things as simple as possible but it's just to illustrate that these concepts are not that alien.

  • Why make it complicated?
  • This obviously just illustrates a point, but callbacks and decorators are not uncommon. And iterators are exactly like that:

    type (
    	Seq[V any]     func(yield func(V) bool)
    	Seq2[K, V any] func(yield func(K, V) bool)
    )
    

    Which is very readable.

  • Why make it complicated?
  • Go's syntax is vastly superior once you have more complicated signatures, then the left-to-right truly matters. For example a variable that contains a pointer to a function that takes a function and an int and returns another function (like a decorator).

    In C the order becomes very hard to understand and you really have to read the thing several times to understand the type of fp:

    int (*(*fp)(int (*)(int, int), int))(int, int)

    In Go, you can just read from left to right and you can easily understand what f's type is:

    f func(func(int,int) int, int) func(int, int) int

    It's just much more readable.

    See: https://go.dev/blog/declaration-syntax

  • Belgian PM says that Netanyahu would not be arrested if he came to Belgium either
  • Either the legal expert is a terrible expert or the reporter is an idiot who misunderstood him (or has an agenda).

    It should also be pointed out that what De Wever says is completely irrelevant as it's not his decision to make. It's the federal prosecution office that acts at the request of the ICC.

    The law in Belgium explicitly forbids political influence over ICC arrests, so it's the judicial branch that orders the action to arrest, not the executive one. Furthermore, after the arrest they transfer him to the ICC where the ICC will first determine if his arrest happened in a lawful way according to international law. It's not the Belgian courts and certainly not Belgian politicians that have any saying here.

    And perhaps a final point: diplomatic immunity does not work in this case. The ICC rules override the immunity rules. This has already been established by the appeal court of the ICC. Otherwise criminals could use that as a loophole to avoid arrests.

    Source: lawyer at the ICC https://www.standaard.be/buitenland/bart-de-wever-heeft-wettelijk-niets-te-zeggen-over-de-aanhouding-van-netanyahu/53096700.html

  • Dries Van Langenhove given 1-year prison sentence
  • Indeed. Humour is subjective, but that also means we can completely ignore whether it's humour or not because it's not relevant. All that matters is intent, and here it was not part of some standup comedy where everybody knows it's an act that can be taken with a big grain of salt and stops at the door. This was clearly a long time ongoing campaign meant to push an agenda of hatred and harassment.

  • Dries Van Langenhove given 1-year prison sentence
  • Seems like a good and fair punishment. The guy was actively and intentionally undermining democracy, spreading hatred and planning for creating conflict. He was and still is clearly a danger to society and people's safety and should be punished accordingly.

  • *Permanently Deleted*
  • Debian sid is in the middle of a transition to 64 bit timestamps on 32 bit architectures. This requires a bump in all packages and an inconsistent repository is to be expected during this migration. Don't use dist-upgrade and always carefully read what apt is about to do.

    See: https://lists.debian.org/debian-devel-announce/2024/02/msg00005.html and https://lists.debian.org/debian-devel/2024/03/msg00092.html

    Also, consider the following best practices when using sid: https://wiki.debian.org/DebianUnstable#What_are_some_best_practices_for_testing.2Fsid_users.3F

  • Elephants on the march across African borders as heat stress leads to fatalities
  • How about you travel there and bring whatever you have?

    Or maybe just start by reflecting why you even felt the need to state your original comment and think 'yeah this is a nice and productive thing to say, that will help for sure'.

  • Elephants on the march across African borders as heat stress leads to fatalities
  • It seems like easy talk to imply people in Africa can just go die of thirst as you think their water now belongs to the elephants, all from the comfort of your chair thousands of kilometers away while your country is contributing a thousand times more to the destruction of the world than they ever will. And I can state this with fair certainty as pretty much every country in the world is doing worse. What was even the point of your comment? How about you give them your water as they deserve it more?

  • Internal vetting confirms SNCB made mistakes in awarding contract to friend of rail boss Sophie Dutordoir [Dutch]
  • The audit report actually pleads the CEO free from pressuring or interfering with the hiring process. To the contrary, according to the audit she had emphasised that the process must be followed fairly and she only referred him as a candidate (which happens often enough but anyone).

    It wasn't corruption for once. Just the usual incompetence and/or laziness, or maybe they were trying to pander to the CEO which wouldn't be a surprise in a bootlicker company atmosphere.

  • Fort Wayne police sergeant fined $35.50 for fatally striking pedestrian in crosswalk
  • Isn't the fine for the traffic violation? The compensation from a civil lawsuit will follow I presume.

    This makes sense in my opinion. Violating traffic rules should result in the same fine regardless of whether you hit someone or not (like drunk driving isn't more OK just because you got lucky and didn't happen to hit anyone). But if you do hit someone, expect to compensate all costs and damages to that person or family on top of the fine (that goes to the state).

    That said, I wish traffic violations would be fined much more harshly. Also if you didn't hit anyone during your reckless behaviour.

  • Protest in Ypres against far-right guest speaker Dries Van Langenhove at IJzerwake
  • Yeah perhaps, but in the US it's much more likely because of the FPTP election system. Splitting up the GOP would effectively wipe out any chances of getting elected for both sides so they stick together in the same party. No wonder BDW wants that system here as well, it would keep all the closet VB'ers in NVA.

  • Niveau de flamand de nos ministres fédéraux francophones - Hoe goed kunnen onze Franstalige federale ministers Vlaams?
  • For me it mostly gives a bad image of how hopeless the situation is. Absolute top politicians should at least be able to have a basic conversation in the other language but they often can't even do that.

    One of the reasons Flanders is so extremely sensitive about the language rules and the language communities is because they see frenchification happening everywhere they go, especially around Brussels (but also in other cities). And when even our top ministers cannot be bothered, it doesn't exactly hint that people will adapt and speak Dutch rather than expecting others will accommodate them in French.

    It would take the nationalists down a few notches if ministers were equally as fluent in Dutch as their Flemish counterparts are in French. Doesn't have to be perfect, just comprehensible and showing effort.

  • Belgian house prices fall for first time in 12 years, Flanders bucks the trend
  • Definitely not with MR in government. They're also the single reason why the woonbonus is still a thing for second homes. Rather than discouraging it, all of us pay taxes so we can hand it to people who are rich enough to buy a second house in the first place for snatching that house away from us and driving up the prices.

    That party is the most populist, anti-science and destructive to the social and financial wellbeing of this country I've seen. And that says a lot if you take a look at some other parties.

  • Belgian house prices fall for first time in 12 years, Flanders bucks the trend
  • I think the solution is taxing second homes while controlling rent prices (so that it's not renters who have to pay that cost) and also make it prohibitively expensive to own more than two places. Huisjesmelkers need to go out of business really fast.

  • InitialsDiceBearhttps://github.com/dicebear/dicebearhttps://creativecommons.org/publicdomain/zero/1.0/„Initials” (https://github.com/dicebear/dicebear) by „DiceBear”, licensed under „CC0 1.0” (https://creativecommons.org/publicdomain/zero/1.0/)SP
    sph @lemmy.world
    Posts 0
    Comments 22