Hacker News new | ask | show | jobs
by bo0tzz 1545 days ago
What programming language requires 'a lot' of boilerplate code to use multiple files? That sounds awful. I don't think the argument for things being easier to find goes up either, with a tool like grep.
2 comments

You don't need to go far. In C, function prototypes in header files are boilerplate ;)
Perl XS (the system used to interface with C) requires module == file, so if you have a particularly large module then it just has to live in a single file. Here's one:

  $ wc -l perl/lib/Sys/Guestfs.xs 
  11930 perl/lib/Sys/Guestfs.xs
Worse still, this expands to C which can be large and takes a noticable time to compile:

  30019 perl/lib/Sys/Guestfs.c