I am working on a Close project and I often write myself close macros for DSL, Seeing how a company uses the closest in its real work and the speaker said that in practical use they do not use macros for their DSL, they only use macros to add a small syntax to the swell. Not. Does that mean that I should write my DSL to use standard functions and then finally add some macros?
Update : After reading many different (and entertaining) reactions on this question I have realized that the answer is not clearly clear as I thought earlier, for many reasons From: There are many different types of APIs (internal, external) in the API Many types of API users (Business user who wants to hurry up, Closer Expert) Whether the Boiler Plate Code Do you have a macro to hide? I will go far away thinking about the question more deeply, but thank you for your reply, because they gave me a lot of things. Apart from this, I saw that Paul Graham Cristof thinks in contrast to the video and thinks that the macro should be a large part of the codebase (25%): If you are writing DSL like Library, to be used in the Closer Code and want to use it in a functional way, then the function on Macros will be preferred. I functions are "good" for the users of the closure because they can be dynamically created in higher sequence functions. For example, you are writing a functional web framework. If you are typing Mandatory DSL, other close codes will be used very independently and you have decided that you definitely do not need a higher order function, So the usage will be very similar and whatever you can understand more, for example, you can create an engine of any type of business rules. If you are writing Special DSL, which requires creating excessive display code, then you probably want to use maximum time macros since they compile time for maximum efficiency Will be expanded in. For example, you are writing some graphics code, which needs to be expanded in the correct order of OpenGL calls ......
Comments
Post a Comment