Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7608491
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T00:55:36+00:00 2026-05-31T00:55:36+00:00

I am designing a language. I am being troubled by what to call else

  • 0

I am designing a language. I am being troubled by what to call “else if”. My language uses indentation for blocks, so I need a keyword for “else if”.

Python uses “elif” (meh…) and Ruby uses “elsif” (yuck!). Personally, I hate to use abbreviations, so I don’t want to use either of these. Instead, I am thinking of just using “else if”, where an arbitrary number of spaces can appear between “else” and “if”.

I’ve noticed that this doesn’t occur very often in programming languages. C# has “yield return” as a keyword, but that’s the only example I can think of.

Is there an implementation concern behind this? I’ve created my lex file and it accepts the keyword with no issues. I am worried there is something I haven’t thought of.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T00:55:38+00:00Added an answer on May 31, 2026 at 12:55 am

    As long as you don’t allow inline comments/newlines, there’s nothing wrong with multi-word keywords. The only thing is that else if might be confusing for your language users, tempting them to write else while or else for. You’ll have hard time explaining them that your else if is a keyword and not two statements following each other.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have found myself designing a language for fun that is a cross between
We are designing a Flash-based language course, and I am not sure which architecture
Im designing a website, and often I need to present information in a nice
I'm relatively new to the world of WhiteBox Testing and need help designing a
I am currently designing and implementing a small programming language as an extra-credit project
I'm designing a language, and trying to decide whether true should be 0x01 or
I'm designing and currently rethinking a low-level interpreted programming language with similarities to assembler.
I am designing a language where I want to use .. to define an
I work for a boutique specialized in finance. We thought about designing a language
I'm designing a programming language which compiles to an intermediary bytecode. However, I'm having

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.