That's how it works in Germany. Usually assignments are either optional or you just have to get 50% of the total assignment marks over the semester to be admitted to the exam (written or often oral, in person). Then your grade is entirely based on the exam. Hand-holding throughout the semester assignment-to-assignment, checking attendance etc. is more an Anglo-specific thing where students are treated as kids instead of adults.
I don’t think there’s anything childish about assigning large-scale programming assignments. I had to do everything from implement a compiler to building a ray tracer as an undergrad, and it set me up very well for an independent career as a software developer at a research lab.
As a professor today, assignments are the place where I’m happy to throw my students into the “deep end” (go learn a new language and a set of library toolkits while also learning this skill.) Exams just don’t provide that experience. Worse, students tend to cram for exams which is the worst way to retain information. I can’t even imagine thinking that the two are comparable in terms of retention and skill-building.
As someone who did CS 15 years ago, assignments show you can actually understand and build programs. Exams show you bothered to re-read the lecture notes the day before and can regurgitate information on command that you could just as easily forget the next day. Not to mention they’re hugely stressful and some students can’t cope with them well even if they’d make excellent programmers.
I can’t imagine disincentivising actually getting stuck into programming and incentivising being good at regurgitating info in an exam room being a good thing for CS students.
If the exam is made well, it's not just regurgitation. It's not multiple choice, but I agree this doesn't test programming skills. But programming is also a quite small slice of the CS curriculum. It has so many other things like linear algebra, real analysis, formal logic, graph theory, automata, coding theory like Reed Solomon, compression, complexity, operating systems like scheduling and virtual memory, how flip-flops and adders and CPUs work. A self taught web developer who can program well still wouldn't know most of these. Programming knowledge is neither fully necessary nor sufficient for a CS degree. I hear American colleges are more vocational, but in most of Europe it's understood that you gain practical experience either in internships, side jobs, doing hobby projects or simply after graduation at your first job.