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 870665
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T10:30:53+00:00 2026-05-15T10:30:53+00:00

Do methods ending with _! such as delete_! or i_is_! have a special meaning?

  • 0

Do methods ending with _! such as delete_! or i_is_! have a special meaning? Are they “just names”? Do they follow some convention? There’s even bulkDelete_!!. (The specific context is Lift if it makes a difference.)

  • 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-15T10:30:53+00:00Added an answer on May 15, 2026 at 10:30 am

    I’m not sure what the convention is for using _! and _!! in Lift, but here’s a bit of background.

    Any alphanumeric identifier can have _ and a list of symbols added and still be parsed as a single identifier. For example:

    scala> class Example_!@%*!
    defined class Example_$bang$at$percent$times$bang
    

    (In fact, you can parse almost anything as an identifier if you surround it with backticks–and this is what you do if a Java class uses a Scala reserved word, for example. Or if you want spaces in your identifiers.)

    The compiler only recognizes one symbolic ending specially, however. If there is a method that looks like a getter, then getter_= will be interpreted as a setter. (Whether you actually use it as a setter is up to you; it will have the semantics of a setter, anyway.) So

    scala> class Q { def q = "Hi"; def q_=(s: String) { println(s.reverse) } }
    defined class Q
    
    scala> val q = new Q
    q: Q = Q@b5c12e
    
    scala> q.q
    res0: java.lang.String = Hi
    
    scala> q.q = "Could use this to set something"
    gnihtemos tes ot siht esu dluoC
    

    In addition, the compiler reverses the order of caller and callee in any method that ends in :. This is most often seen in lists: newElement :: existingList is actually a call to existingList.::(newElement). So, for example:

    scala> object Caps { def to_:(s: String) = s.toUpperCase }
    defined module Caps
    
    scala> "Example" to_: Caps
    res40: java.lang.String = EXAMPLE
    

    Any other usage of _ + symbols is convention.

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

Sidebar

Related Questions

I have a couple of unit test helper extension methods, such as, IsNotEmpty(this string
I've just started using CXF 2.4 to expose some methods in an existing web
Long methods are evil on several grounds: They're hard to understand They're hard to
For methods where ... there exists a static one-to-one mapping between the input and
In methods of controllers, there are usually many checks for doing the right thing.
What methods are available to monitor the status of IFRAME page, I know there
Both methods MyBehavior::CreateSerializer() are not called of some reason, but ReplaceBehavior() method is working.
I have a few methods inside my view controller that load up for future
I seem to remember Scala treating methods ending in _= specially, so something like
Hi I have a class that is a remote object and I implemented methods.

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.