pendantic terminology question 

when a compiler refuses to compile source code due to an error in that code, is it appurropurriate to describe this behavior as the compiler “throwing”?

re: pendantic terminology question 

@aescling throwing is a runtime concept

Follow

re: pendantic terminology question 

@wallhackio what do you mean by this response?

re: pendantic terminology question 

@aescling an error/exception is thrown at runtime. you cant throw an error during compilation its a non-sequitor

re: pendantic terminology question 

@wallhackio compilers don’t have runtimes?

re: pendantic terminology question 

@aescling this specific use case does not guarantee that an exception is thrown by the compiler runtime. (it could be how the compiler is chosen to run but who knows? what if the compiler is written in a language without exceptions?) it is a compiler refusing to compile because the code is errant. that is not an exception that is just program behavior

re: pendantic terminology question 

@wallhackio what if the implementation throws runtime exceptions as the most convenient way of short-circuiting on discovering an error?

re: pendantic terminology question 

@aescling @aescling yeah they can but you cant guarantee that a compiler deciding not to compile code is an exception. thats an implementation detail/design choice

re: pendantic terminology question 

@wallhackio (which is to say, you think that? because, pedantically speaking, compilers have runtimes, and can absol-utely throw exceptions during that runtime)

Sign in to participate in the conversation
📟🐱 GlitchCat

A small, community‐oriented Mastodon‐compatible Fediverse (GlitchSoc) instance managed as a joint venture between the cat and KIBI families.