3 ms·
If it generates a lot of code, then yes. But it may also just generate 2-3 lines of boilerplate code that's very annoying to keep typing over and over.
by FooBarWidget 17y ago
If it generates a lot of code, then yes. But it may also just generate 2-3 lines of boilerplate code that's very annoying to keep typing over and over.
- jsonscripter 17y agoIf you need to type the same thing over and over, something's usually wrong with what you're doing...
- RyanMcGreal 17y agoYeah, you're not using a framework.
- FooBarWidget 17y agoWhen defining a class you need to: - Create a new file for the class. - Type the class keyword - Type the class name. - Type the parent class name. - Type the constructor definition. - Type a call to the parent class's constructor. This is all boilerplate and can easily take half a minute. How am I doing things wrong? Are you saying there's an easier way? Or I can just type something like "./script/generate class Foo Bar" and be done with it and save like 15 seconds.
- jsonscripter 17y agoYeah, that's actually a pretty odd way of doing things. In perl with moose (or just perl6) you just type 'class Foo Bar' in your file and you're good to go.